package com.ys.entity.mall;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Table;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="TM_Order", catalog="Id")
public class TmOrder extends BaseEntity<TmOrder> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="Code", nameJava="code", typeDataBase="varchar")
	private String code;
	@YsField(nameDataBase="GoodsId", nameJava="goodsId", typeDataBase="bigint")
	private Long goodsId;
	@YsField(nameDataBase="GoodsCode", nameJava="goodsCode", typeDataBase="varchar")
	private String goodsCode;
	@YsField(nameDataBase="GoodsName", nameJava="goodsName", typeDataBase="varchar")
	private String goodsName;
	@YsField(nameDataBase="UserId", nameJava="userId", typeDataBase="varchar")
	private String userId;
	@YsField(nameDataBase="Amount", nameJava="amount", typeDataBase="decimal")
	private BigDecimal amount;
	@YsField(nameDataBase="Num", nameJava="num", typeDataBase="int")
	private Integer num;
	@YsField(nameDataBase="Address", nameJava="address", typeDataBase="varchar")
	private String address;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public TmOrder setId(Long id) {
		this.id = id;
		return this;
	}
	public String getCode() {
		return code;
	}
	public TmOrder setCode(String code) {
		this.code = code;
		return this;
	}
	public Long getGoodsId() {
		return goodsId;
	}
	public TmOrder setGoodsId(Long goodsId) {
		this.goodsId = goodsId;
		return this;
	}
	public String getGoodsCode() {
		return goodsCode;
	}
	public TmOrder setGoodsCode(String goodsCode) {
		this.goodsCode = goodsCode;
		return this;
	}
	public String getGoodsName() {
		return goodsName;
	}
	public TmOrder setGoodsName(String goodsName) {
		this.goodsName = goodsName;
		return this;
	}
	public String getUserId() {
		return userId;
	}
	public TmOrder setUserId(String userId) {
		this.userId = userId;
		return this;
	}
	public BigDecimal getAmount() {
		return amount;
	}
	public TmOrder setAmount(BigDecimal amount) {
		this.amount = amount;
		return this;
	}
	public Integer getNum() {
		return num;
	}
	public TmOrder setNum(Integer num) {
		this.num = num;
		return this;
	}
	public String getAddress() {
		return address;
	}
	public TmOrder setAddress(String address) {
		this.address = address;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public TmOrder setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public TmOrder setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public TmOrder setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static TmOrder tmOrder(
		String code,
		Long goodsId,
		String goodsCode,
		String goodsName,
		String userId,
		BigDecimal amount,
		Integer num,
		String address,
		Integer status
			) {
		TmOrder entity = new TmOrder();
		entity.setCode(code);
		entity.setGoodsId(goodsId);
		entity.setGoodsCode(goodsCode);
		entity.setGoodsName(goodsName);
		entity.setUserId(userId);
		entity.setAmount(amount);
		entity.setNum(num);
		entity.setAddress(address);
		entity.setStatus(status);
		return entity;
	}
}